﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using CodeBox.FB.ViewModels;
using CodeBox.FB.DataAccess;
using FBxMVC4.Security;


namespace FBxMVC4.Controllers
{
    public class HomeController : Controller
    {
        TeamDataAccess teamDA;
        [FBxAuth]
        public ActionResult Index()
        {
            teamDA = new TeamDataAccess();
            var teams = teamDA.TeamsList();

            return View(teams);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }

        // GET
        public ActionResult Register()
        {
            return View();
        }
    }
}
